import { useLocation, useOutletContext } from "react-router-dom"

function ChildrenA() {
  const { name } = useOutletContext()
  const { state } = useLocation()

  return (
    <div>
      <p>ComponentName: { state?.componentName }</p>
      <p>{ name }</p>
    </div>
  )
}

export default ChildrenA